<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML>
<html>
<head>
    <title>Home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content=""/>
    <%@include file="../my_js_css/cssInclude.jsp" %>

    <script type="application/x-javascript"> addEventListener("load", function () {
        setTimeout(hideURLbar, 0);
    }, false);

    function hideURLbar() {
        window.scrollTo(0, 1);
    } </script>
<style>
    ol,ul{list-style:none;}
</style>
</head>
<body>
<div class="page-container">
    <!--/content-inner-->
    <div class="left-content">
        <div class="inner-content">
            <!-- header-starts -->
            <div class="header-section">
                <!--menu-right-->
                <div class="top_menu" style="height: 80px; text-align: center;">
                    <span style="display: inline-block; line-height: 80px; font-size: 30px; font-weight: 600; color: #fff">
                         智慧旅游
                    </span>
                    <a style=" float: right; color: #fff; margin: 26px 23px 0 0; font-size: 19px;" class="tooltips" href="/Tourism">
                        <i class="lnr lnr-power-switch"></i>
                    </a>
                    <div class="clearfix"></div>
                </div>
                <!--//menu-right-->
                <div class="clearfix"></div>
            </div>
            <!-- //header-ends -->
            <!--outter-wp-->
            <div class="outter-wp">
                <!--sub-heard-part-->
                <div class="sub-heard-part">
                    <ol class="breadcrumb m-b-0">
                        <li><a href="#">组任务</a></li>

                    </ol>
                </div>
                <!--//sub-heard-part-->
                <div class="graph-visual tables-main">
                    <div class="graph">
                        <div class="tables">
                            <style>
                                .table>thead>tr>th { text-align: center;  }
                                .table td { text-align: center; }
                                .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
                                    vertical-align: initial;
                                    text-align: center;

                                }
                                .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th { padding: 0px !important; }
                                .hover_ul:hover ul {
                                    display: block;
                                }
                                .hover_ul ul {
                                    display: none;
                                }

                                .bai {
                                    background: #fff;
                                }

                            </style>
                            <table class="table table-bordered" style="text-align: center;">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>事件名称</th>
                                    <th>事件内容</th>
                                    <th>发生位置</th>
                                    <th>联系方式</th>
                                    <th>发生日期</th>
                                    <th>流程图</th>
                                    <th>操作</th>

                                </tr>
                                </thead>
                                <tbody >
                                <c:forEach items="${GroupList}" var="list" varStatus="s">
                                    <tr>
                                        <td>${s.index+1}</td>
                                        <td>${list.object.event_title}</td>
                                        <td>${list.object.event_content}</td>
                                        <td>${list.object.event_address}</td>
                                        <td>${list.object.phone}</td>
                                        <td>${list.object.cdate}</td>
                                        <td><button type="button" class="btn green bai" onclick="openFlowChart(${list.object.event_id})">查看</button> </td>
                                        <td>
                                            <button class="btn purple bai" onclick="claim(${list.object.event_id},${emp_id})">领取</button>
                                            <button class="btn orange bai" onclick="info(${list.object.event_id})">详情</button>
                                        </td>
                                    </tr>
                                </c:forEach>

                                </tbody>
                            </table>

                        </div>

                    </div>

                </div>
            </div>

        </div>
    </div>
    <!--//content-inner-->
    <!--/sidebar-menu-->
    <div class="sidebar-menu">
        <header class="logo">
            <a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span> </a>
            <a href="${ctx}/sys/index "> <span id="logo"> <h1>智慧旅游</h1></span> </a>
        </header>
        <div class="down">
            <a   style="display: inline-block;">
                <img style="width: 58px; border: 3px solid #ddd; margin-top: -30px" src="http://202.97.207.34:8199/user.png">
            </a>
            <a    style="display: inline-block; margin-left: 10px; text-align: left;">
                <span style="font-size: 15px; display: inline-block; margin-left: 9px;" class=" name-caret">${emp_name}</span><br />
                <p style="display: inline-block;" id="clock3"></p>
            </a>
        </div>

        <div style="border-top:1px solid rgba(69, 74, 84, 0.7)"></div>

        <div class="menu">
            <ul id="menu" >
                <li><a href="${ctx}/work/addEvent"><i class="lnr lnr-pencil"></i> <span>上报事件</span></a></li>
                <li><a href="${ctx}/work/zworkIndex"><i class="fa fa-file-text-o"></i> <span>组任务</span></a></li>
                <li><a href="${ctx}/work/gworkIndex"><i class="fa fa-file-text-o"></i> <span>个人任务</span></a></li>
                <li><a href="${ctx}/work/insertEvent"><i class="lnr lnr-pencil"></i> <span>提交事件流</span></a></li>
                <li><a href="${ctx}/work/queryAllEvent"><i class="lnr lnr-pencil"></i> <span>查询事件</span></a></li>
                <li id="menu-academico" >
                    <a ><i class="fa fa-table"></i> <span> 系统管理</span> <span class="fa fa-angle-right" style="float: right"></span></a>
                    <ul id="menu-academico-sub" >
                        <li><a href="${ctx}/emp/empIndex">人员管理</a></li>
                        <li><a href="${ctx}/org/orgIndex">部门管理</a></li>
                        <li><a href="${ctx}/role/roleIndex">角色管理</a></li>
                        <li><a href="${ctx}/sys/grid">网格管理</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div class="clearfix"></div>
</div>

<%@include file="../my_js_css/jsInclude.jsp" %>
</body>
<script>
    function claim(eventId,empId) {
        var tourl = "${ctx}/work/claim?eventId="+eventId+"&empId="+empId
        window.location.href=tourl;
    }
    function info(eventId) {
        window.location.href="${ctx}/work/info?eventId="+eventId;
    }
    //查看流程图
    function openFlowChart(eventId) {
        window.open("${ctx}/work/viewImage?eventId=" + eventId, "_blank", "modal=yes,width=1000,height=500,resizable=no,scrollbars=no");
    }
</script>
</html>